<video id="a">
<template id="c"><video></video></template>
<iframe></iframe>
</video>
<template id="cc">
</template>
<script>
if (window.testRunner)
  testRunner.dumpAsText();

$ = document.querySelector.bind(document);
$('iframe').contentDocument.documentElement.appendChild($('#cc'));
$('iframe').contentDocument.documentElement.appendChild($('#a'));
</script>
PASS if no crash.
